#include <MTSServer.h>

extern "C"
{
  IceBox::Service*
  createMTSServer(Ice::CommunicatorPtr communicator)
  {
    return new MTSServer;
  }
}

void
MTSServer::start
(const std::string& name,
 const Ice::CommunicatorPtr& communicator,
 const Ice::StringSeq& args)
{
  Ice::PropertiesPtr properties;
  string adapter;

  properties = communicator->getProperties();
  adapter = properties->getProperty("adapter");
  _adapter = communicator->createObjectAdapter(adapter);

  _adapter->add(new MTSI,
		communicator->stringToIdentity("MTS"));
  _adapter->activate();
}
 
void
MTSServer::stop()
{
  _adapter->deactivate();
}
